The input element represents a typed data field, usually with a form
control to allow the user to edit the data.
Properties |
DOMString | - accept
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - alt
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - autocomplete
- The autocomplete IDL attribute, on getting,
must return the element's IDL-exposed autofill value, and on setting, must
reflect the content attribute of the same name.
|
boolean | - autofocus
- The autofocus IDL attribute must
reflect the content attribute of the same name.
|
boolean | checked |
boolean | - defaultChecked
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - defaultValue
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - dirName
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
boolean | - disabled
- The disabled IDL attribute must
reflect the disabled content attribute.
|
FileList? | files |
HTMLFormElement? | - form
- Reassociateable form-associated elements have a form
IDL attribute, which, on getting, must return the element's form owner, or null if
there isn't one.
|
DOMString | - formAction
- The action IDL attribute must
reflect the content attribute of the same name, except that on getting, when the
content attribute is missing or its value is the empty string, the document's address
must be returned instead. The target IDL attribute
must reflect the content attribute of the same name.
|
DOMString | - formEnctype
- The action IDL attribute must
reflect the content attribute of the same name, except that on getting, when the
content attribute is missing or its value is the empty string, the document's address
must be returned instead. The target IDL attribute
must reflect the content attribute of the same name.
|
DOMString | - formMethod
- The action IDL attribute must
reflect the content attribute of the same name, except that on getting, when the
content attribute is missing or its value is the empty string, the document's address
must be returned instead. The target IDL attribute
must reflect the content attribute of the same name.
|
boolean | - formNoValidate
- The action IDL attribute must
reflect the content attribute of the same name, except that on getting, when the
content attribute is missing or its value is the empty string, the document's address
must be returned instead. The target IDL attribute
must reflect the content attribute of the same name.
|
DOMString | - formTarget
- The action IDL attribute must
reflect the content attribute of the same name, except that on getting, when the
content attribute is missing or its value is the empty string, the document's address
must be returned instead. The target IDL attribute
must reflect the content attribute of the same name.
|
unsigned long | - height
- The IDL attributes width and height must return the rendered width and height of
the image, in CSS pixels, if an image is being rendered, and is being rendered to a
visual medium; or else the intrinsic width and height of the image, in CSS pixels, if an image is
available but not being rendered to a visual medium; or else 0,
if no image is available.
|
boolean | - indeterminate
- The indeterminate IDL attribute must
initially be set to false. On getting, it must return the last value it was set to. On setting, it
must be set to the new value. It has no effect except for changing the appearance of checkbox controls.
|
DOMString | - inputMode
- The type IDL attribute must reflect
the respective content attribute of the same name, limited to only known values. The
inputMode IDL attribute must
reflect the inputmode content attribute,
limited to only known values. The maxLength IDL attribute must reflect
the maxlength content attribute, limited to only
non-negative numbers.
|
NodeList | - labels
- Labelable elements have a NodeList object
associated with them that represents the list of label elements, in tree
order, whose labeled control is the element in question. The labels IDL attribute of labelable elements, on getting, must return that
NodeList object.
|
HTMLElement? | list |
DOMString | - max
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
long | - maxLength
- The type IDL attribute must reflect
the respective content attribute of the same name, limited to only known values. The
inputMode IDL attribute must
reflect the inputmode content attribute,
limited to only known values. The maxLength IDL attribute must reflect
the maxlength content attribute, limited to only
non-negative numbers.
|
DOMString | - min
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
long | - minLength
- The type IDL attribute must reflect
the respective content attribute of the same name, limited to only known values. The
inputMode IDL attribute must
reflect the inputmode content attribute,
limited to only known values. The maxLength IDL attribute must reflect
the maxlength content attribute, limited to only
non-negative numbers.
|
boolean | - multiple
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - name
- The name IDL attribute must reflect
the name content attribute.
|
DOMString | - pattern
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - placeholder
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
boolean | - readOnly
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
boolean | - required
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - selectionDirection
- The selectionDirection
attribute must, on getting, return the string corresponding to the current selection direction: if
the direction is forward, "forward"; if the direction is
backward, "backward"; and otherwise, "none".
|
unsigned long | - selectionEnd
- The selectionEnd attribute
must, on getting, return the offset (in logical order) to the character that immediately follows
the end of the selection. If there is no selection, then it must return the offset (in logical
order) to the character that immediately follows the text entry cursor.
|
unsigned long | - selectionStart
- The selectionStart attribute
must, on getting, return the offset (in logical order) to the character that immediately follows
the start of the selection. If there is no selection, then it must return the offset (in logical
order) to the character that immediately follows the text entry cursor.
|
unsigned long | - size
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - src
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - step
- The accept, alt, max,
min, multiple, pattern, placeholder, required, size, src,
and step IDL attributes must reflect
the respective content attributes of the same name. The dirName IDL attribute must reflect the
dirname content attribute. The readOnly IDL attribute must reflect the
readonly content attribute.
|
DOMString | - type
- The type IDL attribute must reflect
the respective content attribute of the same name, limited to only known values. The
inputMode IDL attribute must
reflect the inputmode content attribute,
limited to only known values. The maxLength IDL attribute must reflect
the maxlength content attribute, limited to only
non-negative numbers.
|
DOMString | - validationMessage
- The validationMessage attribute must
return the empty string if the element is not a candidate for constraint validation
or if it is one but it satisfies its constraints; otherwise,
it must return a suitably localized message that the user agent would show the user if this were
the only form control with a validity constraint problem.
|
ValidityState | - validity
- The validity attribute must return a
ValidityState object that represents the validity states of the element. This object is live, and the same object must be returned each time the element's
validity attribute is retrieved.
|
DOMString | value |
Date? | valueAsDate |
unrestricted double | valueAsNumber |
double | valueHigh |
double | valueLow |
unsigned long | - width
- The IDL attributes width and height must return the rendered width and height of
the image, in CSS pixels, if an image is being rendered, and is being rendered to a
visual medium; or else the intrinsic width and height of the image, in CSS pixels, if an image is
available but not being rendered to a visual medium; or else 0,
if no image is available.
|
boolean | - willValidate
- The willValidate attribute must return
true if an element is a candidate for constraint validation, and false otherwise
(i.e. false if any conditions are barring it from
constraint validation).
|